This code will help produce the three visuals that are going to be a part of each equity tracker indicator webpage: regional map (tract level) of most recent data, chart of the most recent data, chart of trends over time. The inputs/variables will need to be adjusted depending on the indicator characteristics - data source and value type.
To create the map of the most recent data, there are two different approaches that will depend on the indicator’s data source.
a.) If the indicator is a PUMS/OPSI indicator that can be accessed through Elmer. If this is the case, it requires accessing data at the regional/tract level from ACS since the Elmer dataset is already aggregated to equity group/quintile. If this is the case, please start adjusting the code around line 190.
b.) If the indicator is available through a tract-level data set. Getting the data to a workable version may require some data transformation. To map data in this form, there should be a value corresponding to each census tract. Depending on the year of the data, this could be 700 rows for data at 2010 census tracts, or 900 rows for data at 2020 census tracts. If this is the case, please start adjusting the code around line 320.